import request from '@/utils/request'

// 分页获取订单列表
export const getAssistantList = (query) => {
  return request({
    url: '/business/assistant/list',
    method: 'get',
    params: query
  })
}

// 根据订单Id获取详细信息
export const getAssistantById = (assistantId) => {
  return request({
    url: `/business/assistant/${assistantId}`,
    method: 'get'
  })
}

// 增加订单
export const addAssistant = (data) => {
  return request({
    url: '/business/assistant',
    method: 'post',
    data
  })
}

// 修改订单
export const modifyAssistant = (data) => {
  return request({
    url: `/business/assistant`,
    method: 'put',
    data
  })
}

// 删除订单
export const delAssistant = (assistantIds) => {
  return request({
    url: `/business/assistant/${assistantIds}`,
    method: 'delete'
  })
}
